// /////////////////////////////////////////////////////////////////////////////
//
// Name:            ColourScript.h
// Author:          Michael Bartsch
//
// Desc:            This file contains the glue-functions that enable the
//                  interaction between CColourAnalyser and Lua.
//
// License:         Copyright (C) 2008-2009 Michael Bartsch
//
//                  This program is free software: you can redistribute it
//                  and/or modify it under the terms of the GNU General Public
//                  License as published by the Free Software Foundation,
//                  either version 3 of the License, or (at your option) any
//                  later version.
//
//                  This program is distributed in the hope that it will be
//                  useful, but WITHOUT ANY WARRANTY; without even the implied
//                  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
//                  PURPOSE. See the GNU General Public License for more
//                  details.
//
//                  You should have received a copy of the GNU General Public
//                  License along with this program. If not, see
//                  <http://www.gnu.org/licenses/>.
//
// /////////////////////////////////////////////////////////////////////////////

#if !defined(__COLOURSCRIPT_H_INCLUDED__)
#define __COLOURSCRIPT_H_INCLUDED__

// Include required header file(s).
#include "../ColourAnalyser.h"
#include "./ScriptManager.h"


// Main function:
//! Register all function in this file into the Lua Scripting Language.
//!
//! The functions can be accessed through ColourAnalyser:<function> (notice
//! the colon!) or ca<function>.
extern void registerColourAnalyser(lua_State *L);

// Glue functions:
//! Glue function for CColourAnalyser::updateImage.
extern int lua_ca_updateImage(lua_State *L);
// Glue functions:
//! Glue function for CColourAnalyser::analyseImage
extern int lua_ca_analyseImage(lua_State *L);

//! Glue function for CColourAnalyser::connect
extern int lua_ca_connect(lua_State *L);

//! Glue function for CColourAnalyser::getIsTarget
extern int lua_ca_getIsTarget(lua_State *L);
//! Glue function for CColourAnalyser::getIsMatchRGB
extern int lua_ca_getIsMatchRGB(lua_State *L);
//! Glue function for CColourAnalyser::getIsMatchR
extern int lua_ca_getIsMatchR(lua_State *L);
//! Glue function for CColourAnalyser::getIsMatchG
extern int lua_ca_getIsMatchG(lua_State *L);
//! Glue function for CColourAnalyser::getIsMatchB
extern int lua_ca_getIsMatchB(lua_State *L);

//! Glue function for CColourAnalyser::getTargetR
extern int lua_ca_getTargetR(lua_State *L);
//! Glue function for CColourAnalyser::getTargetG
extern int lua_ca_getTargetG(lua_State *L);
//! Glue function for CColourAnalyser::getTargetB
extern int lua_ca_getTargetB(lua_State *L);

//! Glue function for CColourAnalyser::getTargetMargin
extern int lua_ca_getTargetMargin(lua_State *L);
//! Glue function for CColourAnalyser::getTargetBorder
extern int lua_ca_getTargetBorder(lua_State *L);

//! Glue function for CColourAnalyser::setIsTarget
extern int lua_ca_setIsTarget(lua_State *L);
//! Glue function for CColourAnalyser::setTarget
extern int lua_ca_setTarget(lua_State *L);
//! Glue function for CColourAnalyser::setTargetR
extern int lua_ca_setTargetR(lua_State *L);
//! Glue function for CColourAnalyser::setTargetG
extern int lua_ca_setTargetG(lua_State *L);
//! Glue function for CColourAnalyser::setTargetB
extern int lua_ca_setTargetB(lua_State *L);

//! Glue function for CColourAnalyser::getBiggestR
extern int lua_ca_getBiggestR(lua_State *L);

//! Glue function for CColourAnalyser::getBiggestG
extern int lua_ca_getBiggestG(lua_State *L);

//! Glue function for CColourAnalyser::getBiggestB
extern int lua_ca_getBiggestB(lua_State *L);

//! Glue function for CColourAnalyser::getSelectedDevice
extern int lua_ca_getSelectedDevice(lua_State *L);

//! Glue function for CColourAnalyser::getDevices
extern int lua_ca_getDevices(lua_State *L);

//! Glue function for CColourAnalyser::setTargetMargin
extern int lua_ca_setTargetMargin(lua_State *L);
//! Glue function for CColourAnalyser::setTargetBorder
extern int lua_ca_setTargetBorder(lua_State *L);
#endif
